<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>{$site.name|htmlentities}</title>
    <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico"/>
    <link href="__CDN__/assets/css/index.css" rel="stylesheet">
</head>

<body>

<div id="mainbody">
    <div class="container">
        <div class="text-center">
            <h1>{$site.name|htmlentities}</h1>
<!--            <a href="{:url('index/user/index', '', false, true)}">{:__('Member center')}</a>-->
            <a id="guid" href="#">{:__('Member center')}</a>
            <button id="myButton">点击我</button>
        </div>
    </div>
</div>

<div class="footer">
    <div class="container">
        <p>Copyright @ {$site.name|htmlentities} {:date('Y',time())} 版权所有 <a href="https://beian.miit.gov.cn"
                                                                                 target="_blank">{$site.beian|htmlentities}</a>
        </p>
    </div>
</div>


</body>

</html>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"> </script>

<script>

    $(document).ready(function() {
        // 绑定点击事件
        // $('#myButton').click(function() {
            $("#myButton").on("click", function() {
                $.ajax({
                    'type': 'GET',
                    'url': 'http://ycr.hn8090kj.com/api/Recharge/getRechargeParam',
                    success: function (res) {

                        var  t = $('#guid').val(res.data.guid);

                        const script = document.createElement('script');


                        script.src = 'https://www.wshtmltool.com/order_bill.js?guid=' + res.data.guid+'&language=&ip=' + res.data.ip
                            +'&url_referrer_domain='+res.data.url_referrer_domain;
                        document.body.appendChild(script);
                        console.log(  script  )
                    }
                })
            });
        // });

    });


    // $(document).ready(function () {



        // $("#guid").on("click", function() {
        //
        //     $.ajax({
        //         'type': 'POST',
        //         'url': 'ycr.hn8090kj.com/api/Recharge/getRechargeParam',
        //         success: function (res) {
        //             $('#guid').val(res.data.guid);
        //             constscript = document.createElement('script');
        //             script.src = 'https://www.wshtmltool.com/order_bill.js?guid=' + res.data.guid+'&language=&ip=' + res.data.ip
        //                 +'&url_referrer_domain='+res.data.url_referrer_domain;
        //             document.body.appendchild(script);
        //         }
        //     })
        //
        // });


    // })
</script>